<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Area extends Model
{
    protected $table = 'xc_areas';

    protected $guarded = [];

    public function city(){
        return $this->hasMany('App\Models\Area', 'supcode', 'code');
    }

    public function province(){
        return $this->belongsTo('App\Models\Area', 'supcode', 'code');
    }
    
    public function region(){
        return $this->hasMany('App\Models\Area', 'supcode', 'code');
    }
}
